﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jaqen.Lifenear.Entity
{
    public class LifenearContext:DbContext
    {
        public DbSet<User> Users { get; set; }

        public DbSet<Photo> Photos { get; set; }

        public DbSet<Album> Albums { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new UserEntityConfiguation());
            modelBuilder.Entity<Photo>().ToTable("tb_Photo");
            modelBuilder.Entity<Album>().ToTable("tb_Album");
            
        }
    }
}
